import postApi from '../../utils/http/api'
import postApiNew from '../../utils/http/api-new'
//用户相关接口
export default {

  ///获取用户身份证验证
  verifyIDCard () {
    return postApi({
      actionCode: '100527',
      method: 'getUserIDCardInfo',
      requestData: {},
    })
  },
  //绑定身份证信息
  bindIDCard (name, number) {
    return postApi({
      actionCode: '100527',
      method: 'addUserIDCardInfo',
      requestData: {
        realname: name,
        idcard: number
      },
    })
  },
  editUser (data) {
    return postApi({
      actionCode: '100500',
      method: 'editUser',
      requestData: data,
    })
  },
  getUserInfo () {
    return postApi({
      actionCode: '100500',
      method: 'getUserInfo',
      requestData: {},
    })
  },
  //修改手机号 type传1
  getAuthCode (mobile) {
    return postApi({
      actionCode: '100200',
      method: 'getAutoCode',
      requestData: {
        mobile,
        'type': 1,
      },
    })
  },
  //获取用户信息 对外不需登录
  getTargetUserInfo (userId) {
    return postApi({
      actionCode: '100100',
      method: 'getTargetUserInfo',
      requestData: {
        targetUserid: userId
      },
    })
  },
  //通过userId获取用户列表
  getUserList (userIds) {
    return postApiNew({
      actionCode: 'zhiye-user',
      path: '/enterprise/hftuser/getByUserIds',
      requestData: {
        'userIds': userIds
      },
    })
  },
  //通过userId获取用户列表
  getUserExtList (userIds) {
    return postApiNew({
      actionCode: 'zhiye-user',
      path: '/user/getUserExtInfoByUserIds',
      requestData: {
        'userIds': userIds
      },
    })
  },

  //1.4好房通用户管理历史列表
  hftList () {
    return postApiNew({
      actionCode: 'zhiye-user',
      path: '/enterprise/hftuser/hftList',
      requestData: {},
    })
  },
  //1.4好房通用户管理历史列表
  editUserList ( data) {
    return postApiNew({
      actionCode: 'zhiye-user',
      path: '/enterprise/hftuser/editUserList',
      requestData: {
        ...data
      },
    })
  },

}
